package priv.stones.number;

import java.math.BigInteger;

/**
 * @Author: Stones
 * @Description:
 * @Date: 2017/9/25 11:18
 */
public class BigInteger1 {

    public static void main(String[] args) {
        BigInteger big1 = new BigInteger("111111111111111111111");
        BigInteger big2 = new BigInteger("22222222222222222");
        System.out.println("add:" + big2);
        System.out.println("sub:" + big1.subtract(big2));
        System.out.println("mul:" + big1.multiply(big2));
        System.out.println("divide:" + big1.divide(big2));
        BigInteger big3[] = big1.divideAndRemainder(big2);
        System.out.println("divide1:" + big3[0] + "   divide2:" + big3[1]);
    }

}
